package _0814;
import java.io.FileOutputStream;
import java.io.IOException;
import java.nio.charset.StandardCharsets;
import java.util.Scanner;

public class Note {
    public static void main(String[] args) throws IOException {
        Scanner scanner = new Scanner(System.in);
        FileOutputStream fos = new FileOutputStream("note.txt");
        System.out.println("请输入内容：");
        while (true) {
            String s = scanner.nextLine();
            if ("exit".equals(s)) {
                break;
            } else {
                byte[] data = s.getBytes(StandardCharsets.UTF_8);
                fos.write(data);
            }
        }
        fos.close();

    }


}

